/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import React, { PureComponent } from "react";
import PageHeaderLayout from "@/layouts/PageHeaderLayout";
import StandardTab from "@/components/StandardTab";
import {
  ServiceSettings,
  ServiceRecord,
  StorageFeeSetting,
  StorageFeeDistribution,
  StorageFeeStatistics,
} from "./Dispat/index";
import styles from "./style.less";

export default class Dispatch extends PureComponent {
  state = {
    activeKey: "",
  };

  render() {
    const { activeKey } = this.state;
    const panes = [
      {
        tab: "服务费设置",
        component: <ServiceSettings />,
      },
      {
        tab: "服务费统计",
        component: <ServiceRecord />,
      },
      {
        tab: "保管费设置",
        component: <StorageFeeSetting />,
      },
      {
        tab: "保管费统计",
        component: <StorageFeeStatistics />,
      },
      {
        tab: "保管费发放",
        component: <StorageFeeDistribution />,
      },
    ];
    return (
      <PageHeaderLayout title="服务费与保管费">
        <div className={styles.main}>
          <div style={{ paddingBottom: "24px", position: "relative" }}>
            <StandardTab
              style={{ marginBottom: 24 }}
              onChange={activeKey => {
                this.setState({
                  activeKey,
                });
              }}
              activeKey={activeKey}
              name="dispat"
              panes={panes}
            />
          </div>
        </div>
      </PageHeaderLayout>
    );
  }
}
